home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000283_jp107@amtp.cam.ac.uk_Tue Feb 8 15:50:00 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  3KB

  1. Received: from kro.amtp.cam.ac.uk by cs.umb.edu with SMTP id AA13403
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Tue, 8 Feb 1994 10:50:45 -0500
  3. Return-Path: <J.S.Peatfield@damtp.cambridge.ac.uk>
  4. Received: from local MTA by kro.amtp.cam.ac.uk with Smail-3.1.28.1
  5.      id m0pTui0-00020QC; Tue, 8 Feb 94 15:50 GMT
  6. Message-Id: <m0pTui0-00020QC%kro.amtp.cam.ac.uk@damtp.cambridge.ac.uk>
  7. Date: Tue, 8 Feb 94 15:50 GMT
  8. To: tex-k@cs.umb.edu
  9. Subject: xdvik 1.6 scaleing bug
  10. From: Jon Peatfield <J.S.Peatfield@amtp.cam.ac.uk>
  11.  
  12. xdvik 1.6 doesn't get the magstep right for included postscript files,
  13. here is a quick patch which seems to work for me.  Someone who
  14. understands the code better should check this.
  15.  
  16. --cut-here--
  17. *** dvi_init.c.orig    Mon Feb  7 09:41:34 1994
  18. --- dvi_init.c    Tue Feb  8 15:21:24 1994
  19. ***************
  20. *** 62,68 ****
  21.    * DVI preamble and postamble information.
  22.    */
  23.   static    char    job_id[300];
  24. ! static    long    numerator, denominator, magnification;
  25.   
  26.   /*
  27.    * Offset in DVI file of last page, set in read_postamble().
  28. --- 62,70 ----
  29.    * DVI preamble and postamble information.
  30.    */
  31.   static    char    job_id[300];
  32. ! static    long    numerator, denominator;
  33. ! /* Needed elsewhere now  08/02/94  JSP */
  34. ! long magnification;
  35.   
  36.   /*
  37.    * Offset in DVI file of last page, set in read_postamble().
  38. *** epsf.c.orig    Sat Dec 18 20:00:58 1993
  39. --- epsf.c    Tue Feb  8 15:42:26 1994
  40. ***************
  41. *** 31,36 ****
  42. --- 31,38 ----
  43.   
  44.   #include "epsf.h"
  45.   extern void put_grey_rectangle ();
  46. + /* Needed from dvi_init.c 08/02/94  JSP */
  47. + extern long magnification;
  48.   
  49.   #ifndef L_tmpnam
  50.   #define L_tmpnam 256
  51. ***************
  52. *** 425,431 ****
  53.     /* rwi is 10 times the desired width, in points.  epsf_scale is thus the
  54.      * scale according to the \special command.  (For epsfile.tex specials,
  55.      * x and y scale are always the same.) */
  56. !   epsf_scale = (float)(rwi) / 10.0 / (float)(urx-llx+1);
  57.   
  58.     /* 
  59.      * Scale the bounding box.  The floating point calculations have
  60. --- 427,437 ----
  61.     /* rwi is 10 times the desired width, in points.  epsf_scale is thus the
  62.      * scale according to the \special command.  (For epsfile.tex specials,
  63.      * x and y scale are always the same.) */
  64. !   /* Consider also that we may have a non zero MAGSTEP to worry about too!
  65. !      The scale should also depend on this   08/02/94  JSP */
  66. !   epsf_scale = ((float)(rwi) * ( magnification / 10000.0)) / (float)(urx-llx+1);
  67.   
  68.     /* 
  69.      * Scale the bounding box.  The floating point calculations have
  70. --cut-here--
  71.  
  72.  
  73. -- Jon
  74.  
  75. Jon Peatfield, Computer Officer, the DAMTP, University of Cambridge
  76. Telephone: (+44 223) 3-37852     Mail: J.S.Peatfield@amtp.cam.ac.uk
  77.  
  78.       Friends don't let friends use PP.     PP: Just say NO.